from econoplot.models import User
from google.appengine.ext import db

class EntryTemplate (db.Model):
        name = db.StringProperty ()
        filename = db.StringProperty ()

        def __unicode__ (self):
                return self.name

class BlogEntry (db.Model):
        title = db.StringProperty ()
        author = db.ReferenceProperty (User)
        pub_date = db.DateTimeProperty (auto_now_add=True)
        text = db.TextProperty ()
        slug = db.StringProperty ()
        template = db.ReferenceProperty (EntryTemplate)
	published = db.BooleanProperty ()

	def __unicode__ (self):
		return self.title
